<#include "../common/basePage.ftl">
<@addCSS [
"/app/lib/css/plugins/clockpicker/clockpicker",
"/app/lib/css/plugins/select2/select2.min",
"/app/lib/css/plugins/datapicker/datepicker3",
"/app/lib/css/plugins/datapicker/bootstrap-datetimepicker",
"/app/lib/css/plugins/datapicker/bootstrap-datetimepicker.min",
"/app/lib/css/plugins/summernote/summernote-bs3",
"/app/lib/css/plugins/summernote/summernote",
"/app/lib/css/plugins/chosen/chosen",
"/app/lib/css/plugins/dataTables/datatables.min",
"/app/lib/css/plugins/footable/footable.core"
]/>

<@addJS [
"/app/lib/js/plugins/select2/select2.full.min",
"/app/lib/js/plugins/summernote/summernote.min",
"/app/lib/js/plugins/datapicker/bootstrap-datetimepicker",
"/app/lib/js/plugins/chosen/chosen.jquery",
"/app/lib/js/plugins/dataTables/datatables.min",
"/app/lib/js/plugins/footable/footable.all.min"

]/>

<@common "工作进展历史记录">
<style>
.footable-row-detail-name{
	width:80px;
}
</style>
<input type="hidden" id="group" value="workprogress"/>
<input type="hidden" id="item" value="historyrecord"/>
<div class="row">
    <div class="col-lg-12">
    
    
        <div class="ibox float-e-margins">
            <div class="ibox-title" >
             
               <h3 align="center">信息规划中心工作表单记录汇总</h3>
          
                <div class="ibox-tools">
                    
                </div>
            </div>
            <div class="ibox-content table-responsive">   
				<div class="col-sm-6 m-b-xs">
                	<label class="col-sm-2" style="padding-left:0px;line-height:40px">第几周</label>
                    <div data-toggle="buttons" class="btn-group col-sm-9" style="padding-left:16px;">
                    	<input id="weekNum" type="text" placeholder="写入查询的周数" class="form-control"
												name ="weekNum" value="">
                    </div>
                </div>
             
				<div class="col-sm-6 m-b-xs">
                	<label class="col-sm-2" style="padding-left:0px;line-height:40px">工作表年限</label>
                    <div data-toggle="buttons" class="btn-group col-sm-9" style="padding-left:16px;">
                    	<input id="currentYear" type="text" placeholder="写入记录写入的年限" class="form-control"
												name ="currentYear" value="">
                    </div>
                </div>
                 <div class=" col-sm-7 custom_btn">	            		
	            		<button type="button"  class="btn btn-primary  btn-warning" onclick="filer()" style="margin:0px 10px">查询</button>
	           	        <button type="button"  class="btn   " onclick="viewreload()" style="margin:0px 10px">清空条件(Clear)</button>
	             </div> 
          
            	     <table class="table table-striped table-bordered table-hover dataTables-example" id="tb1" >
                    <thead>
                 
                    <tr>
                         <th>分类</th>
                        <th>事项</th>
                        <th>责任人</th>
                        <th>本周工作进展</th>
                        <th>中心信息</th>
                        <th>是否完成</th>
                        <th>未完成原因</th>
                        <th>解决措施</th>
                        <th>下周工作计划</th>
                        <th data-hide="phone,tablet">计划完成时限</th>
						<th>需部门或中心协调的问题</th>
						<th>周数</th>
						<th>工作表年限</th>						    
                    </tr>         
                    </thead>
                    <tbody>
                       <#list datalist as data>
			            <tr class="gradeX">
			                <td >${(data.jobType)!}</td>
			                <td >${(data.jobName)!}</td>
			                <td >${(data.staffNameAll)!}</td>
			                <td >${(data.currentProgress)!}</td>
			                <td >${(data.staffDepart)!}</td>
			                <td >${(data.doesFinish)!}</td>
			                <td >${(data.reason)!}</td>
			                <td >${(data.measure)!}</td>
			                <td >${(data.futurePlan)!}</td>
			                <td style="max-width:400px">${(data.planDeadline)!}</td>
	     					<td>${(data.upgradeIssue)!}</td>
	     					<td >${(data.weekNum)!}</td>
			                <td >${(data.currentYear)!}</td>				          
			            </tr>
		         </#list>
                    </tbody>
                    <tfoot>
                    	<tr>
                      <th>分类</th>
                        <th>事项</th>
                         <th>责任人</th>
                        <th>本周工作进展</th>
                        <th>中心信息</th>
                        <th>是否完成</th>
                        <th>未完成原因</th>
                        <th>解决措施</th>
                        <th>下周工作计划</th>
                        <th data-hide="phone,tablet">计划完成时限</th>
						<th>需部门或中心协调的问题</th>
					    <th>周数</th>
						<th>工作表年限</th>
                    </tr>
                    </tfoot>
                </table>				
                <div class="footer">
		        </div> 
            </div>
        </div>
    </div>
<script>
      $(document).ready(function(){
    
    	$('.dataTables-example').DataTable({
            dom: '<"html5buttons"B>lTfgitp',
            pageLength:25,
            "ordering": false,
            buttons: [
                { extend: 'copy'},
                {extend: 'csv'},
                {extend: 'excel', title: 'ExampleFile'},
                {extend: 'pdf', title: 'ExampleFile'},

                {extend: 'print',
                 customize: function (win){
                        $(win.document.body).addClass('white-bg');
                        $(win.document.body).css('font-size', '10px');

                        $(win.document.body).find('table')
                                .addClass('compact')
                                .css('font-size', 'inherit');
                }
                }
            ]
        });
    });
    
	
	    function filer(){
		var weekNum = document.getElementById("weekNum").value;
    	var currentYear = document.getElementById("currentYear").value;
		if(weekNum == ""){
		weekNum = "weekNum";
		}
		if(currentYear == ""){
		currentYear= "currentYear";
		}
    	window.location.href = "${servePath}/pc/workingreport/llist/"+weekNum + "/" + currentYear;
    }
    function viewreload(){
    	window.location.href = "${servePath}/pc/workingreport/llist/weekNum/currentYear";
    }
</script>
</@common>